home *** CD-ROM | disk | FTP | other *** search
/ 9-Digit Zip Code Directory / 9-Digit Zip Code Directory (American Business Information) (ABIZIP-12).ISO / z4src.zip / NEW.H < prev    next >
C/C++ Source or Header  |  1993-11-23  |  1KB  |  49 lines

  1. /***
  2. *new.h - declarations and definitions for C++ memory allocation functions
  3. *
  4. *   Copyright (c) 1990-1992, Microsoft Corporation.  All rights reserved.
  5. *
  6. *Purpose:
  7. *   Contains the function declarations for C++ memory allocation functions.
  8. *
  9. ****/
  10.  
  11. #ifndef _INC_NEW
  12.  
  13. #ifdef __cplusplus
  14.  
  15.  
  16. /* constants for based heap routines */
  17.  
  18. #define _NULLSEG    ((__segment)0)
  19. #define _NULLOFF    ((void __based(void) *)0xffff)
  20.  
  21. /* types and structures */
  22.  
  23. #ifndef _SIZE_T_DEFINED
  24. typedef unsigned int size_t;
  25. #define _SIZE_T_DEFINED
  26. #endif 
  27.  
  28. typedef int (__cdecl * _PNH)( size_t );
  29. typedef int (__cdecl * _PNHH)( unsigned long, size_t );
  30. typedef int (__cdecl * _PNHB)( __segment, size_t );
  31.  
  32. /* function prototypes */
  33.  
  34. _PNH __cdecl _set_new_handler( _PNH );
  35. _PNH __cdecl _set_nnew_handler( _PNH );
  36. _PNH __cdecl _set_fnew_handler( _PNH );
  37. _PNHH __cdecl _set_hnew_handler( _PNHH );
  38. _PNHB __cdecl _set_bnew_handler( _PNHB );
  39.  
  40. #else 
  41.  
  42. /* handler functions only supported in C++, emit appropriate error */
  43. #error Functions declared in new.h can only be used in C++ source
  44.  
  45. #endif 
  46.  
  47. #define _INC_NEW
  48. #endif 
  49.